package pers.mihao.quickstream.publish.manager.impl;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import pers.mihao.quickstream.common.plus.lock.annotation.EnableGlobalLock;
import pers.mihao.quickstream.common.plus.lock.annotation.LockKey;
import pers.mihao.quickstream.publish.manager.PublishDetailTaskManager;
import pers.mihao.quickstream.publish.model.dto.PublishDetailTaskDTO;
import pers.mihao.quickstream.publish.repository.PublishDetailTaskRepository;

import javax.annotation.Resource;

/**
 * @author mihao
 * @since 2024/11/24
 */
@Component
@Slf4j
public class PublishDetailTaskManagerImpl implements PublishDetailTaskManager {

    @Resource
    PublishDetailTaskRepository publishDetailTaskRepository;

    @Override
    @EnableGlobalLock
    public void publishDetailTask(@LockKey long detailTaskId) {
        PublishDetailTaskDTO publishDetailTaskDTO = publishDetailTaskRepository.queryById(detailTaskId);
    }
}
